Skip to content

📑 api: Update openapi docs and code generation#397

Merged
shp7724 merged 3 commits intomasterfrom
shp7724/api
Jan 17, 2026
Merged

📑 api: Update openapi docs and code generation#397
shp7724 merged 3 commits intomasterfrom
shp7724/api

Conversation

@shp7724
Copy link
Contributor

@shp7724 shp7724 commented Jan 15, 2026

No description provided.

@shp7724 shp7724 requested a review from a team as a code owner January 15, 2026 13:49
Copilot AI review requested due to automatic review settings January 15, 2026 13:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the codebase to align with updated OpenAPI specifications and regenerated API client code. The changes primarily involve renaming API methods, updating parameter types from String to their proper types (Int32, Int64, enum values), and removing the createdAt field from the Friend model.

Changes:

  • Updated API method names to match new OpenAPI specifications (e.g., getBriefgetTimetableBriefs, searchLecturesearchLectures)
  • Changed parameter types from String to proper types (Int32, Int64, enum types) across multiple API calls
  • Removed createdAt field from Friend model and all related code

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
TimetableAPIRepository.swift Updated API method names and parameter types for timetable operations
LectureSearchAPIRepository.swift Changed API method name and parameter types for lecture search
LectureAPIRepository.swift Updated parameter types and API method names for lecture operations
CourseBookAPIRepository.swift Changed API method names and parameter types for course book operations
ThemeAPIRepository.swift Updated API method name, removed debug code, and split payload methods
NotificationAPIRepository.swift Changed API method name and parameter types for notifications
FriendManageOptionSheet.swift Removed createdAt parameter from Friend initialization in preview
FriendEditDisplayNameSheet.swift Removed createdAt parameter from Friend initialization in preview
FriendRequestViewModel.swift Removed unused return value assignment
FriendsAPIRepository.swift Updated Friend model usage, removed createdAt field, changed API method return type
FakeFriendsRepository.swift Removed createdAt field from Friend initializations
FriendsRepository.swift Changed requestFriend method signature to return void
Friend.swift Removed createdAt property from Friend model
AuthAPIRepository.swift Updated API method names and added missing parameter

Comment on lines +92 to +95
id: response.first.id ?? "",
userId: response.second.id ?? "",
nickname: response.second.nicknameWithoutTag,
tag: String(response.second.nicknameTag),
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using optional chaining with empty string fallbacks (e.g., response.first.id ?? '') can mask API contract violations. If these IDs are truly required, the code should fail explicitly rather than silently defaulting to empty strings, which could lead to bugs downstream where empty IDs are used.

Copilot uses AI. Check for mistakes.
Comment on lines 50 to 55
fileprivate func toModifyPayload() -> Components.Schemas.TimetableThemeModifyRequestDto {
.init(
colors: colors.map { .init(bg: $0.bgHex, fg: $0.fgHex) },
name: name
)
}
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The toAddPayload() and toModifyPayload() methods contain identical implementations. Consider consolidating them into a single method or extracting the shared logic to avoid duplication.

Copilot uses AI. Check for mistakes.
@shp7724 shp7724 merged commit 0924ad8 into master Jan 17, 2026
1 check passed
@shp7724 shp7724 deleted the shp7724/api branch January 17, 2026 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant